<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/11/22
 * Time: 14:14
 */

namespace Modules\Web\Http\Controllers;

use Illuminate\Http\Request;
use Modules\Web\Service\ShopMasterService;

class ShopMasterController extends BaseController
{

    /**
     *  获取门店的所有技师列表
     *  hinq 2019 11 22
     *
     **/
    public function shop_master(){
        $arr_list = ShopMasterService::shop_master();
        return response_json($arr_list);
    }


    /**
     *  获取指定技师信息
     *  hinq 2019 11 22
     *
     **/
    public function shop_master_detail( Request $request ){
        $nId = (int) $request->get('id');
        $arr_list = ShopMasterService::shop_master_detail( (int) $nId );
        return response_json($arr_list);
    }

    /**
     *  添加指定技师信息
     *  hinq 2019 11 22
     *
     **/
    public function shop_master_store( Request $request )
    {
        $arr_input = (array) $request->all();
        $arr_list = ShopMasterService::shop_master_store( (array) $arr_input );
        return response_json($arr_list);
    }

    /**
     *  编辑指定技师信息
     *  hinq 2019 11 22
     *
     **/
    public function shop_master_update( Request $request )
    {
        $arr_input = (array) $request->all();
        $arr_list = ShopMasterService::shop_master_update( (array) $arr_input );
        return response_json($arr_list);
    }

    /**
     *  获取门店的所有技师列表
     *  hinq 2019 11 22
     *
     **/
    public function shop_master_del( Request $request )
    {
        $nId = (int) $request->get('id');
        $arr_list = ShopMasterService::shop_master_del( (int) $nId );
        return response_json($arr_list);
    }


}